///*
// * Copyright 2013-2018 the original author or authors.
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// *      https://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */
//
//package com.huike.springboot1.demos.web;
//
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.*;
//
///**
// * @author <a href="mailto:chenxilzx1@gmail.com">theonefx</a>
// */
//@Controller
//public class PathVariableController {
//
//    // http://127.0.0.1:8080/user/123/roles/222
//    @RequestMapping(value = "/user/{userId}/roles/{roleId}", method = RequestMethod.GET)
//    @ResponseBody
//    public String getLogin(@PathVariable("userId") String userId, @PathVariable("roleId") String roleId) {
//        return "User Id : " + userId + " Role Id : " + roleId;
//    }
//
//    // http://127.0.0.1:8080/javabeat/somewords
//    @RequestMapping(value = "/javabeat/{regexp1:[a-z-]+}", method = RequestMethod.GET)
//    @ResponseBody
//    public String getRegExp(@PathVariable("regexp1") String regexp1) {
//        return "URI Part : " + regexp1;
//    }
//
////   使用删除Delete请求，访问路径：localhost:8080/user1
////   使用删除Delete请求，访问路径：localhost:8080/user2
////   使用删除Delete请求，访问路径：localhost:8080/user3
//    @DeleteMapping("/user/{userID}")
//    @ResponseBody
////    用@PathVariable接收ID,user1绑定为上面Mapping里的{userID},然后pathVariable里的id获取这个userID，最后path里的id绑定给String id
//    public String deleteUser(@PathVariable("userID") String userID) {
//        return "User Id : " + userID;
//    }
//}
